import Vue from 'vue'
import VueRouter from 'vue-router'
import wode from '../views/wode.vue'
import tuijian from '../views/tuijian.vue'
import paihang from '../views/paihang.vue'
import geshou from '../views/geshou.vue'
import search from '../views/search/search.vue'

// 二级页面
import paihangdetail from '../views/paihang/paihangdetail.vue'
import singerdetail from '../views/geshou/singerdetail.vue'
import tuijiandetail from '../views/tuijian/tuijiandetail.vue'
import wodedetail from '../views/wode/wodedetail.vue'

// 播放页面
import playsong from '../views/song/playsong.vue'

// 搜索页面
import searchdetail from '../views/search/searchdetail.vue'

// 登录、注册页面
import login from '../views/login/login.vue'
import register from '../views/login/register.vue'
import emptypage from '../views/login/emptypage.vue'

//弹出层页面
import gerenxinxi from '../views/tanchuceng/gerenxinxi.vue'

// 评论页面
import pinglun from '../views/pinglun/pinglun.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/wode',
    name: 'wode',  
    component: wode
  },
  {
    path: '/tuijian',
    name: 'tuijian',
    // 增加权限
    meta:{
      requireAuth: true
    },
    component: tuijian
  },
  {
    path: '/paihang',
    name: 'paihang',
    meta:{
      requireAuth: true
    },
    component: paihang
  },
  {
    path: '/geshou',
    name: 'geshou',
    meta:{
      requireAuth: true
    },
    component: geshou
  },
  {
    path: '/paihang/paihangdetail/id',
    name: 'paihangdetail',
    component: paihangdetail
  },
  {
    path: '/geshou/singerdetail/id',
    name: 'singerdetail',
    component: singerdetail
  },
  {
    path: '/tuijian/tuijiandetail/id',
    name: 'tuijiandetail',
    component: tuijiandetail
  },
  {
    path: '/song/playsong/id',
    name: 'playsong',
    component: playsong
  },
  {
    path: '/search/search',
    name: 'search',
    component: search
  }
  ,
  {
    path: '/search/searchdetail',
    name: 'searchdetail',
    component: searchdetail
  },
  {
    path: '/login/login',
    name: 'login',
    component: login
  },
  {
    path: '/login/register',
    name: 'register',
    component: register
  },
  {
    path:'/login/emptypage',
    name:'emptypage',
    component:emptypage
  },
  {
    path:'/wode/wodedetail/id',
    name:'wodedetail',
    component:wodedetail
  },
  {
    path:'/tanchuceng/gerenxinxi',
    name:'gerenxinxi',
    component:gerenxinxi
  },
  {
    path:'/pinglun/pinglun/id',
    name:'pinglun',
    component:pinglun
  }

]

const router = new VueRouter({

  routes
})

export default router
